package com.gistmap.ntdc.mq;

import com.gistmap.ntdc.persistence.domain.MerchantOrder;
import com.gistmap.ntdc.service.MerchantOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

@Component
public class Consumer {

	@Autowired
	private MerchantOrderService merchantOrderService;

	@JmsListener(destination = "order.queue")
	public void receiveOrderQueue(String orderId) {
		merchantOrderService.unpayCheck(Long.parseLong(orderId));
	}

}

